package com.lj.demo.eduservice.client;

import com.lj.demo.commonutils.R;
import com.lj.demo.eduservice.client.impl.VodFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: liujiang
 * @Date: 2020/12/17/23:59
 * @Description:
 */
@Component
@FeignClient(value = "service-vod",fallback = VodFileDegradeFeignClient.class)
public interface VodClient {
    //定义调用方法的路径
    //根据视频id删除阿里云视频
    //PathVariable注解一定要指定参数名称，否则会出错
    @DeleteMapping("vodService/vodVideo/removeVideo/{videoId}")
    public R removeVideo(@PathVariable("videoId") String videoId);


    @DeleteMapping("vodService/vodVideo/removeVideoList")
    public R removeVideoList(@RequestParam("videoIdList") List<String> videoIdList);
}
